library(Seurat)
library(monocle)
library(Matrix)
library(dplyr)
library(RColorBrewer)
library(ggplot2)
library(ggExtra)
library(cowplot)
library(wesanderson)
#Set ggplot theme as classic
theme_set(theme_classic())Progenitors.data <- readRDS("Progenitors.RDS")p1 <- FeaturePlot(object = Progenitors.data,
features = "Revelio.cc",
pt.size = 1,
cols = rev(colorRampPalette(brewer.pal(n =10, name = "Spectral"))(100)),
reduction = "spring",
order = T) & NoAxes()
p2 <- DimPlot(object = Progenitors.data,
group.by = "Revelio.phase",
pt.size = 1,
reduction = "spring",
cols = c(wes_palette("FantasticFox1")[1:3],"grey40",wes_palette("FantasticFox1")[5])) & NoAxes()
p1 + p2 # Normalization
Progenitors.data <- NormalizeData(Progenitors.data, normalization.method = "LogNormalize", scale.factor = 10000, assay = "RNA")Progenitors.data <- FindVariableFeatures(Progenitors.data, selection.method = "vst", nfeatures = 2000, assay = "RNA")Cell.cycle.trend <- function(Seurat.data,
group.by,
gene){
data <- Seurat.data@meta.data %>% select("Revelio.cc", "Revelio.phase", "Cell_ident")
data$Gene <- Progenitors.data@assays$RNA@data[gene,]
if (!group.by == "Cell_ident") {
p <- ggplot(data=data, aes(x= Revelio.cc, y= Gene)) +
geom_point(aes(color= Revelio.phase), size=0.5) +
scale_color_manual(values= c(wes_palette("FantasticFox1")[1:3],"grey40",wes_palette("FantasticFox1")[5])) +
geom_smooth(method="loess", n= 50, fill="grey") +
ylim(0,NA) +
ggtitle(gene)
} else {
p <- ggplot(data=data, aes(x= Revelio.cc, y= Gene)) +
geom_point(aes(color= Cell_ident), size=0.5) +
scale_color_manual(values= c("#68b041", "#e3c148", "#e46b6b")) +
geom_smooth(method="loess", n= 50, aes(color= Cell_ident)) +
ylim(0,NA) +
ggtitle(gene)
}
return(p)
}
Plot.Genes.trend <- function(Seurat.data,
group.by,
genes){
pList <- mapply(FUN = Cell.cycle.trend, gene = genes,
MoreArgs = list(Seurat.data = Seurat.data, group.by=group.by),
SIMPLIFY = FALSE)
print(x = cowplot::plot_grid(plotlist = pList, ncol = 2))
} Plot.Genes.trend(Seurat.data= Progenitors.data,
group.by = "Revelio.phase",
genes= c("Ccna2", "Ccne1",
"Ccnb2", "Ccnb1",
"Cdk1", "Pcna",
"Mcm6", "Hist1h2bc",
"Top2a", "Tpx2",
"Hes1", "Hes6",
"Hes5","Neurog2"))Plot.Genes.trend(Seurat.data= Progenitors.data,
group.by = "Revelio.phase",
genes= c("Neurog2", "Btg2",
"Hes6", "Dll1",
"Gadd45g","Magi1",
"Elavl4", "Mfng",
"Foxn3","Spsb1"))Plot.Genes.trend(Seurat.data= Progenitors.data,
group.by = "Cell_ident",
genes= c("Foxn3","Spsb1",
"Cdkn1c","H2afx",
"Nkd1", "Wls",
"Gmnc", "Ooep",
"Bok", "Cdk6",
"Skil", "Rassf4",
"Cenpw","Folr1"))#date
format(Sys.time(), "%d %B, %Y, %H,%M")## [1] "03 décembre, 2021, 19,33"
#Packages used
sessionInfo()## R version 4.1.2 (2021-11-01)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
##
## locale:
## [1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
## [5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
## [7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] splines stats4 stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] wesanderson_0.3.6 cowplot_1.1.1 ggExtra_0.9
## [4] RColorBrewer_1.1-2 dplyr_1.0.7 monocle_2.22.0
## [7] DDRTree_0.1.5 irlba_2.3.3 VGAM_1.1-5
## [10] ggplot2_3.3.5 Biobase_2.54.0 BiocGenerics_0.40.0
## [13] Matrix_1.3-4 SeuratObject_4.0.4 Seurat_4.0.5
##
## loaded via a namespace (and not attached):
## [1] Rtsne_0.15 colorspace_2.0-2 deldir_1.0-6
## [4] ellipsis_0.3.2 ggridges_0.5.3 spatstat.data_2.1-0
## [7] farver_2.1.0 leiden_0.3.9 listenv_0.8.0
## [10] ggrepel_0.9.1 fansi_0.5.0 codetools_0.2-18
## [13] docopt_0.7.1 knitr_1.36 polyclip_1.10-0
## [16] jsonlite_1.7.2 ica_1.0-2 cluster_2.1.2
## [19] png_0.1-7 pheatmap_1.0.12 uwot_0.1.10
## [22] shiny_1.7.1 sctransform_0.3.2 spatstat.sparse_2.0-0
## [25] compiler_4.1.2 httr_1.4.2 assertthat_0.2.1
## [28] fastmap_1.1.0 lazyeval_0.2.2 limma_3.50.0
## [31] later_1.3.0 htmltools_0.5.2 tools_4.1.2
## [34] igraph_1.2.9 gtable_0.3.0 glue_1.5.1
## [37] RANN_2.6.1 reshape2_1.4.4 Rcpp_1.0.7
## [40] slam_0.1-49 scattermore_0.7 jquerylib_0.1.4
## [43] vctrs_0.3.8 nlme_3.1-153 lmtest_0.9-39
## [46] xfun_0.28 stringr_1.4.0 globals_0.14.0
## [49] mime_0.12 miniUI_0.1.1.1 lifecycle_1.0.1
## [52] goftest_1.2-3 future_1.23.0 MASS_7.3-54
## [55] zoo_1.8-9 scales_1.1.1 spatstat.core_2.3-1
## [58] promises_1.2.0.1 spatstat.utils_2.2-0 parallel_4.1.2
## [61] yaml_2.2.1 reticulate_1.22 pbapply_1.5-0
## [64] gridExtra_2.3 sass_0.4.0 rpart_4.1-15
## [67] fastICA_1.2-3 stringi_1.7.6 highr_0.9
## [70] densityClust_0.3 rlang_0.4.12 pkgconfig_2.0.3
## [73] matrixStats_0.61.0 qlcMatrix_0.9.7 evaluate_0.14
## [76] lattice_0.20-45 ROCR_1.0-11 purrr_0.3.4
## [79] tensor_1.5 labeling_0.4.2 patchwork_1.1.1
## [82] htmlwidgets_1.5.4 tidyselect_1.1.1 parallelly_1.29.0
## [85] RcppAnnoy_0.0.19 plyr_1.8.6 magrittr_2.0.1
## [88] R6_2.5.1 generics_0.1.1 combinat_0.0-8
## [91] DBI_1.1.1 pillar_1.6.4 withr_2.4.3
## [94] mgcv_1.8-38 fitdistrplus_1.1-6 survival_3.2-13
## [97] abind_1.4-5 tibble_3.1.6 future.apply_1.8.1
## [100] crayon_1.4.2 KernSmooth_2.23-20 utf8_1.2.2
## [103] spatstat.geom_2.3-0 plotly_4.10.0 rmarkdown_2.11
## [106] viridis_0.6.2 grid_4.1.2 data.table_1.14.2
## [109] FNN_1.1.3 sparsesvd_0.2 HSMMSingleCell_1.14.0
## [112] digest_0.6.29 xtable_1.8-4 tidyr_1.1.4
## [115] httpuv_1.6.3 munsell_0.5.0 viridisLite_0.4.0
## [118] bslib_0.3.1
Institute of Psychiatry and Neuroscience of Paris, INSERM U1266, 75014, Paris, France, matthieu.moreau@inserm.fr↩︎